home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC 2000 February
/
LogicCd--feb.2000-mac-cdr.iso
/
Macintosh
/
System
/
Kaleidoscope schemes
/
SchemeChecker 1.4.3.sit
/
SchemeChecker 1.4.3
/
SchemeChecker
/
background_2602.xml
next >
Wrap
Extensible Markup Language
|
1999-01-17
|
18KB
|
13 lines
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
<background>
<id>2602</id>
<filler1>0</filler1>
<cantDelete> <true /> </cantDelete>
<showPict> <true /> </showPict>
<dontSearch> <false /> </dontSearch>
<link rel="stylesheet" type="text/css" href="stylesheet_3196.css" />
<name></name>
<script>on prepareToCheck whatToCheckset cursor to watchglobal mainID,SPres,paths,resultIDif resultID is not "" and there is a window ID resultID thenanswer "A Result window is currently open." & return & return & ¬"To check more schemes, you must close the open Result window." with "Close results" or "OK"if it is "Close results" then send "resultWin" && resultID & ",8" to this cdelse exit prepareToCheckend ifif SPres is "" then readResDataput selectedScheme() into schemeInUseput "" into schemePathsput "" into schemesif whatToCheck is "OneScheme" thenanswer file "Select a scheme to check:" of type "Colr"set cursor to watchput it into schemePathsput resolveAlias(schemePaths) into schemePathsif schemePaths ≠ schemeInUse thenif it is empty or the result is cancel then exit PrepareToCheckset itemDelimiter to ":"put last item of schemePaths into schemesset itemDelimiter to ","elseanswer "The scheme " & quote & schemeNameInUse & quote & ¬" can not be checked, as it is the active scheme." with "OK"exit PrepareToCheckend ifelseset itemDelimiter to numToChar(20)put mwGet("Text",mainID,15) into listOfSchemesrepeat with z = 1 to the number of lines in listOfSchemesput item 1 of line z of listOfSchemes into line z of listOfschemesend repeatset itemDelimiter to ","if whatToCheck = "selected" thenput mwGet("Selection",mainID,15) into selectedItemsrepeat with i = 1 to the number of lines in selectedItemsput line (item 2 of line i of selectedItems) of listOfschemes & return after schemesput line (item 2 of line i of selectedItems) of paths & return after schemePathsend repeatelse if whatToCheck="all" thenput listOfschemes into schemesput paths into schemePathselse if whatToCheck = "new" thenput findFolder(P) & "SchemeChecker prefs" into SCprefsFileopen file scPrefsFileread from file scPrefsFile for 70000put it & return into checkedListclose file scPrefsFilerepeat with i = 1 to the number of lines in pathsif i mod 20 = 0 then set cursor to busyput getFInfo(line i of paths) into fileInfoput (line i of listOfSchemes) & "," & item 5 to 6 of fileInfo into fileModifiedif fileModified is not in checkedList thenput line i of paths & return after schemePathsput line i of listOfSchemes & return after schemesend ifend repeatif schemePaths is "" thenanswer "There are no new or updated schemes to check in the selected folder."exit PrepareToCheckend ifend ifrepeat with i = 1 to the number of lines in schemesif line i of Schemepaths = "Error : File not found" then put ":: File not found" into line i of SchemePathsif line i of SchemePaths = schemeInUse thenanswer "The scheme " & quote & schemeNameInUse & quote & ¬" will not be checked, as it is the active scheme." with "Refresh list" or "Continue"if it is "Refresh list" thenbuildListexit PrepareTocheckelsedelete line i of schemesdelete line i of schemePathsif whatToCheck = "selection" and the number of lines in selectedItems is 1 then exit PrepareToCheckend ifend ifend repeatend ifcheck schemes,schemePathsend prepareToCheckon Check schemes,schemePathsset cursor to watchglobal resultID,progressID,schemeResultsput "" into schemeResultsdrawProgressWindowput the number of lines of schemes into numOfFilesrepeat with a = 1 to numOfFilesput "" into searchResultsmwSet "Text",progressID,1,"Checking scheme " & a && "of" ¬&& numOfFiles & ":" ¬& return & line a of schemesif line a of schemePaths = ":: File not found" thenset itemDelimiter to numToChar(20)put "This is an alias which points to a scheme that no longer exists." into item (a*4) of schemeResultsset itemDelimiter to ","elsecheckScheme a,line a of schemePaths-- insert K2 for K2 schemesget ResText(Colr,129,line a of schemepaths,"hex")if character 7 to 8 of it is a number and char 7 of it ≥ 2then put " (K2)" after line a of schemes-- end insertmwSet "Value",progressID,2,(a*100 div (numOfFiles))if the mouse is down or the mouseClick thenif a is 1 thenif numOfFiles = 1 thenget megaWindow("set","text",progressID,1,"Cancelling...")cleanUpexit checkend ifput "1 scheme." into numStringput "this scheme?" into whatToDisplayelseput a && "schemes." into numStringput "these schemes?" into whatToDisplayend ifanswer "SchemeChecker has already checked" && numString && "Do you want to show the results from " & whatToDisplay with "Continue" or "Cancel" or "OK"if it is not "continue" then cleanUpif it is "OK" thenput line 1 to a of schemes into schemesexit repeatelse if it is "Cancel" thenput "" into schemeResultsexit checkend ifend ifend ifend repeatshowResultWindowput line 1 of schemes into theSchemeset itemDelimiter to ","mwSet "text",resultID,1,schemesget megaWindow("Set","Selection",resultID,1,"1,1")send ("resultWin " & resultID & ",1") to this cdif there is a window "Progress" thenclose window id progressIDput "" into progressIDend ifshow window id resultIDend checkon checkScheme a,theFileglobal resultPaths,schemeResults,SPres,Sres,minRes,allRes,WDEFmin,BeBoxMin,BeBoxAll,dontInclude,scPrefs,Accents1,Accents2,progressIDput resolveAlias(theFile) into theFileget FullResList("T=All","O=TIA","W=" & theFile)if first word of it is not "Error" thenput it into liste-- for K2 compatibilityget ResText(Colr,129,theFile,"hex")put character 7 to 8 of it into schemeversionput FullResList("T=WDEF","O=TIS","W=" & theFile) into WDEFlistif "WDEF,-14330" is not in WDEFList thenput "regular" into schemeTypeelseget ResText(WDEF,-14330,theFile)if "Copyright © 1995-1996 ISYS Development Corp. All rights reserved." is in it thenput "BeBox" into schemeTypeelseput "Other" into schemeTypeend ifend ifset the itemDelimiter to ","put "" into bitsResultsput "" into missingResultsput "" into notNeededResultsput "" into furtherInfoif schemeType is "regular" thenput allRes into fullListput minRes into minListelse if schemeType is "BeBox" thenput BeBoxAll into fullListput BeBoxMin into minListelse if schemeType is "Other" thenput allRes into fullListput WDEFmin into minListend ifput the number of lines in liste into numOfresif schemeType ≠ "Other" thenrepeat with i = 1 to numOfResput item 3 of line i of liste into resBitsput item 1 to 2 of line i of liste & return into resInfoput item 1 to 2 of line i of liste & "," into lineInfoif schemeversion is a number and schemeversion ≥ 20 thenif item 1 of resInfo is not in "cicn,ppat,wnd#,cinf" thenif (lineInfo) is not in fullList thenput resInfo after notNeededResultsend ifelse if item 1 of resinfo is in "cinf,wnd#" thenif "cicn," & item 2 of lineInfo & "," is not in liste thenput resInfo after notNeededResultsend ifend ifelseif (lineInfo) is not in fullList thenput resInfo after notNeededResultsend ifend ifif "U" is in resBits and "S" is in resBits thennext repeatelse if "U" is not in resBits and "S" is not in resBits thenif resInfo is in Sres or resInfo is in SPres thenput resInfo after bitsResultsend ifelse if "S" is in resBits thenif resInfo is in Sres thennext repeatelse if resInfo is in SPres thenput resInfo after bitsResultsend ifelse if "U" is in resBits thenif resInfo is in Sres or resInfo is in SPres thenput resInfo after bitsResultsend ifend ifend repeatelserepeat with i = 1 to numOfResput item 3 of line i of liste into resBitsput item 1 to 2 of line i of liste & return into resInfoif "U" is in resBits and "S" is in resBits then-- do nothingelse if "U" is not in resBits and "S" is not in resBits thenif item 1 of resInfo is in "cicn,icl4,ics4,icl8,ics8,ICN#,ics#" or resInfo is in Sres or resInfo is in SPres thenif item 2 of resInfo ≠ "-16455" then put resInfo after bitsResultsend ifelse if "S" is in resBits thenif resInfo is in Sres then-- do nothingelse if resInfo is in SPres or item 1 of resInfo is in "cicn,icl4,ics4,icl8,ics8,ICN#,ics#" thenif item 2 of resInfo ≠ "-16455" then put resInfo after bitsResultsend ifelse if "U" is in resBits thenif resInfo is in Sres or resInfo is in SPres or item 1 of resInfo is in "cicn,icl4,ics4,icl8,ics8,ICN#,ics#" thenif item 2 of resInfo ≠ "-16455" then put resInfo after bitsResultsend ifend ifend repeatend ifif "WDEF" is in liste thenput search(liste,"WDEF",true,all) into WDEFresrepeat with z=1 to the number of lines of WDEFresif "U" is in item 3 of line (item 1 of line z of WDEFres) of liste thenput item 1 to 2 of line (item 1 of line z of WDEFres) of liste & return after bitsResultsend ifend repeatend ifput FullResList("T=All","O=TI","W=" & theFile) into kortListeif not(schemeversion is a number and schemeversion ≥ 20) then -- K2put the number of lines in minList into minListNumif minList ≠ "" then repeat with j = 1 to minListNumif line j of minList is not in kortListe then put line j of minList & return after missingResultsend repeatend if-- check for resources that chould not be includedput the number of lines in dontInclude into numDontrepeat with j = 1 to numDontif line j of dontInclude is in kortListe then put line j of dontInclude & return after notNeededResultsend repeatif item 7 of scPrefs is "true" thenif "cicn,-12286" is in kortListe thenput the number of lines in accents1 into minResNumrepeat with j = 1 to minResNumif line j of accents1 is not in kortListe then put line j of accents1 & return after missingResultsend repeatend ifif "cicn,-12256" is in kortListe thenput the number of lines in accents2 into minResNumrepeat with j = 1 to minResNumif line j of accents2 is not in kortListe then put line j of accents2 & return after missingResultsend repeatend ifend ifset the itemdelimiter to ":"put last item of theFile into theTitleset the itemdelimiter to ","-- minimum K version checkput ResText(SCve,129) into acceptversif (schemeversion is not in acceptvers and char 1 of schemeversion ≠ 2) or (schemeversion is not a number) thenput 1 into xrepeat until item 3 of ResLine is not ""put line x of liste into ResLineadd 1 to xend repeat-- see if the file is lockedget ResSet(theFile,resLine)if it = "" thenbeepanswer "The minimum Kaleidoscope version ($" & schemeversion & ¬") specified in " & quote & theTitle & quote & ¬" is an illegal entry." & return & return & "Do you want to fix this?" with "Don't Fix" or "Fix"if it is "Fix" thenchangeversion theFile,theTitleget ResText(Colr,129,theFile,"hex")if char 7 to 8 of it ≠ schemeversion thenput character 7 to 8 of it into schemeversioncheckScheme a,theFileexit checkSchemeend ifend ifelsebeepanswer "The minimum Kaleidoscope version ($" & schemeversion & ¬") specified in " & quote & theTitle & quote & ¬" is an illegal entry." & return & return & ¬"This file (or its resource fork)" & ¬"is locked, so you have to fix this manually in ResEdit." with "OK"end ifend ifif notNeededResults contains "wnd#" and char 1 of schemeversion < 2 thenbeepanswer quote & theTitle & quote & " contains the new wnd# resources used by " & ¬"Kaleidoscope 2.0 schemes, but it's minimum Kaleidoscope version is set to $" & ¬schemeversion & "." & return & return & ¬"Set the minimum version to $20?" with "No" or "Yes"if it is "yes" thenput ResText(Colr,129,theFile,"hex") into ColrResput "20" into char 7 to 8 of ColrResTextRes ColrRes,Colr,129,theFile,true,"hex"checkScheme a,theFileexit checkSchemeend ifend ifdelete last char of bitsResultsdelete last char of missingResultsdelete last char of notNeededResultssort lines of bitsResults numeric by item 2 of eachsort lines of bitsResults by item 1 of eachsort lines of missingResults numeric by item 2 of eachsort lines of missingResults by item 1 of eachsort lines of notNeededResults numeric by item 2 of eachsort lines of notNeededResults by item 1 of eachput getFurtherInfo(liste,theFile,schemeType,WDEFList) into furtherInfoglobal setbitsif bitsResults is not empty and setbits is true thenput mwGet("Text",progressID,1) into displayedTextput "resource" into resif the number of lines of bitsResults ≠ 1 then put "s" after resput "Fixing " & the number of lines of bitsResults && res & " with unset bits" into line 2 of displayedTextmwSet "Text",progressID,1,displayedTextglobal SPRes,SRes,resultIDset itemDelimiter to ","repeat with i = 1 to the number of lines in bitsResultsput line i of bitsResults into theResif theRes is in SPRes then put "SU" into whatToSetelse if theRes is in Sres then put "S" into whatToSetelse put "" into whatToSetput theRes & "," & whatToSet into line i of resBitsend repeatget ResSet(theFile,resBits)if it ≠ "" then answer itelseput the number of lines of bitsResults into item 10 of furtherInfoput "" into bitsResultsend ifend if-- put file path into new globalput theFile into line a of resultPathsput schemeversion into item 9 of furtherinfoelseput "SchemeChecker was not able to check this scheme." into furtherInfoput "" into bitsResultsput "" into missingResultsput "" into notNeededResultsend ifset itemDelimiter to numToChar(20)put bitsResults into item (a*4)-3 of schemeResultsput missingResults into item (a*4)-2 of schemeResultsput notNeededResults into item (a*4)-1 of schemeResultsput furtherInfo into item (a*4) of schemeResultsset itemDelimiter to ","end checkSchemeon changeversion theFile,theTitleglobal versIDput "button,110,164,187,184,OK,mac,0,12" & return ¬& "button,14,164,94,184,Cancel,mac,0,12" & return ¬& "oneLine,161,133,192,155,0,12,$15" & return ¬& "list,12,43,191,126,vert,true,false,one,0,0,12" & return ¬& "staticText,12,136,160,153,Geneva,10,Or enter the preferred value:" & return ¬& "staticText,12,9,190,40,Geneva,10,Select the minimum Kaleidoscope version supported by this scheme:" & return ¬& "frame,10,41,193,128,emboss,,0,12" & return ¬& "staticText,14,180,94,204,Geneva,10" & return ¬& "frame,160,132,193,156,emboss,,0,12" into ObjectListput screenSenter() into screenMiddleput item 1 of screenMiddle-101 & "," & item 2 of screenMiddle-98 & ¬"," & item 1 of screenMiddle+102 & "," & item 2 of screenMiddle+99 & "G" into TheRectput MegaWindow("New",theTitle,theRect,ObjectList, ¬false,"","modeless","kalVers","56360,56360,56360") into versidmwSet "Text",versID,4,ResText(SCve,128)get megaWindow("Set","Selection",versID,4,"1,1")mwSet "Text",versID,8,theFilemwSet "Visible",versID,8,falseshow window id versidsetMenuGray trueMegaModalize versID,true-- execution pauses until megaModalize returns trueclose window id versidend changeversionfunction getfurtherInfo liste,theFile,schemeType,WDEFListif "TMPL" is in liste then put true into item 1 of furtherInfoelse put "false" into item 1 of furtherInfoif "WDEF,-14330" is in liste thenput true into item 2 of furtherInfoif schemeType is "BeBox" thenput "BeBox" into item 7 of furtherInfoput 1 into crepeat until line c of WDEFlist contains "WDEF,-14330"if c < the number of lines in WDEFlist then add 1 to celse exit repeatend repeatput item 3 of line c of WDEFlist into WDEFsizeif WDEFsize = 15591 then put "1.5" into item 8 of furtherInfoelse if WDEFsize = 16095 then put "1.5.1" into item 8 of furtherInfoelse if WDEFsize = 16395 then put "1.6" into item 8 of furtherInfoelse if WDEFsize = 18198 then put "1.7" into item 8 of furtherInfoelse if WDEFsize = 18286 then put "1.7.1/1.7.2" into item 8 of furtherInfoelse if WDEFsize = 16314 then put "1.7.3/1.8.x/2.0.x" into item 8 of furtherInfoelseput "Unknown" into item 8 of furtherInfoend ifelseput "other" into item 7 of furtherInfoend ifelse put "false" into item 2 of furtherInfoif "DLOG,-14320" is in liste and "DITL,-14320" is in liste then put true into item 3 of furtherInfoelse put "false" into item 3 of furtherInfoif "vers,1" is in liste thenput char 1 to 11 of resText(vers,1,theFile,"hex") into hexversput resText(vers,1,theFile) into versget char 7 to 8 of hexversif it is not "80" thenif char 10 of hexVers is "0" then delete char 10 of hexVersif it is "20" thenput "d" into char 7 to 9 of hexverselse if it is "40" thenput "a" into char 7 to 9 of hexverselse if it is "60" thenput "b" into char 7 to 9 of hexversend ifelse delete char 7 to 11 of hexversdelete char 6 of hexVersif char 5 of hexVers is not "0" then put "." after char 4 of hexverselse delete char 5 of hexVersput "." into char 3 of hexversif char 1 of hexvers is "0" then delete char 1 of hexversput "." after charput hexVers into item 4 of furtherInfoif vers contains "Gregory D. Landweber" or vers contains "Frederick J. Bass" or vers contains "Arlo Rose" then put "true" into item 5 of furtherInfoelseput "false" into item 5 of furtherInfoend ifelseput "" into item 4 of furtherInfoput "" into item 5 of furtherInfoend ifif "STR ,-16397" is in liste then put true into item 6 of furtherInfoelse put "false" into item 6 of furtherInforeturn furtherInfoend getfurtherinfoon cleanUpglobal progressIDclose window id progressIDput "" into progressIDend cleanUp</script>
</background>